<?php

declare(strict_types=1);
/**
 * This file is part of Hyperf.
 *
 * @link     https://www.hyperf.io
 * @document https://hyperf.wiki
 * @contact  group@hyperf.io
 * @license  https://github.com/hyperf/hyperf/blob/master/LICENSE
 */
namespace App\Resource\Backend;

use App\Model\RoleMenu;
use App\Traits\ResourceWith;
use Hyperf\Resource\Json\JsonResource;

class AdminResource extends JsonResource
{
    use ResourceWith;
    /**
     * Transform the resource into an array.
     */
    public function toArray(): array
    {
        return [
            'id' => $this->id,
            'user_name' => $this->user_name,
            'avatar' => $this->avatar,
            'login_name' => $this->login_name,
            'role_id' => $this->role_id,
        ];
    }
}
